using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;

namespace DNAide.Website.UserControls
{
	public partial class NavigationSectionHomePage : System.Web.UI.UserControl
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			StringWriter sw = new StringWriter();
			HtmlTextWriter writer = new HtmlTextWriter(sw);
			writer.WriteFullBeginTag("ul");
			foreach (SiteMapNode childNode in SiteMap.CurrentNode.ChildNodes)
			{
				writer.WriteFullBeginTag("li");
				writer.WriteBeginTag("a");
				writer.WriteAttribute("href", childNode.Url);
				writer.Write(HtmlTextWriter.TagRightChar);
				writer.Write(childNode.Title);
				writer.WriteEndTag("a");
				writer.WriteEndTag("li");
			}
			writer.WriteEndTag("ul");
			this.NavigationSectionHomePageHtml.Text = sw.GetStringBuilder().ToString();
		}
	}
}